DATAS SEGMENT
    SUR DB 1,2,3,4,5,6,7,8
    N EQU $-SUR
    MAX DB 0
DATAS ENDS

CODES SEGMENT
    ASSUME CS:CODES,DS:DATAS
START:
	MOV AX,DATAS
    MOV DS,AX
    
    LEA SI,SUR
    MOV CX,N
    MOV AL,[SI]
    MOV [MAX],AL
LOP:
    MOV AL,[SI]
    CMP [MAX],AL
    JA NEXT
    MOV [MAX],AL
NEXT:
    INC SI
    LOOP LOP
    
    MOV AH,4CH   
    INT 21H
CODES ENDS
    END START